package com.example.teesystem.common.websocket.model;

import com.example.teesystem.entity.Issue;
import com.example.teesystem.entityDto.IssueBriefMessage;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 封装分组信息返回结果
 */
@Data
@NoArgsConstructor
public class GroupResult {
    /**
     * 分组 id
     */
    private String id;
    
    /**
     * 玩家 a id
     */
    private Integer userAId;
    
    /**
     * 玩家 b id
     */
    private Integer userBId;
    
    /**
     * 当前题
     */
    private Integer curIssue;
    
    /**
     * 题目个数
     */
    private Integer issueSize;
    
    /**
     * 第 1 道题目
     */
    private IssueBriefMessage issue0;
    
    public GroupResult(String id, Integer userAId, Integer userBId, Integer issueSize, Issue issue0) {
        this.id = id;
        this.userAId = userAId;
        this.userBId = userBId;
        this.issueSize = issueSize;
        this.issue0 = new IssueBriefMessage(issue0);
        this.curIssue = 0;
    }
}
